<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Project extends Model
{
        protected $fillable=[
            'name','thumb'
        ];
       public function user()
       {
           return $this->belongsTo('App\User');
       }
       public function task(){
        return $this->hasMany('App\Task');
       }
       public function getThumbAttribute($value){
           return $value ?? 'default.jpg';
       }
       
  
}
